package com.example.commonsinterface.controller;

import com.example.commonsinterface.dto.WeatherResponse;
import com.example.commonsinterface.service.RedisCache;
import com.example.commonsinterface.service.commonsInterface;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;

@RestController
public class CommonsController {

    @Autowired
    private commonsInterface cI;


    @GetMapping("/search")
    @ResponseBody
    public WeatherResponse search(@RequestParam("cityid") String cityid) {

        System.out.println("commons调用了-------------------------");

        return cI.search(cityid);
    }

}
